package com.star.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 博客首页数据
 *
 * @author tanyapeng
 * @date 2021/2/4
 */
@Data
public class FirstPageBlog {
    /**
     * blog
     */
    private Long id;
    private String title;
    private String firstPicture;
    private Integer views;
    private Integer commentCount;
//    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
//    @JsonSerialize(using = LocalDateTimeSerializer.class)
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    private String description;

    /**
     * Type
     */
    private String typeName;

    /**
     * User
     */
    private String nickname;
    private String avatar;
}